<template>
	<view>
		<view class="navBox">
		   <uni-data-select v-model="value" :localdata="range" class="picker">
		    </uni-data-select>
			<view v-if="isCreateUser" class="excel" @click="">导出表格</view>
		</view>
			<view class="orders">
				<view class="orderItem" v-for="(item,index) in orders" :key="index">
					<view class="cover">
						<image src="../../static/images/gugou/2.jpg" mode="aspectFill"></image>
					</view>
					<view class="goodsName">
						<view class="groupName">
							{{item.group.name}}
						</view>
						<view class="roleName">
							{{item.role.name}}
						</view>
					</view>
					<view class="details">
						<view class="state">
							{{item.order.state}}
						</view>
						<view class="rolePrice">
							￥{{item.role.rolePrice}}
						</view>
						<view class="count">
							×{{item.order.goodsNums}}
						</view>
					</view>
				</view>
			</view>
	</view>
</template>

<script>
	import {getOrderDetail} from "../../api/goods.js"
	export default {
		data() {
			return {
				isCreateUser:true,
				orders:[
					{
						goods:{coverImage:"../../static/images/gugou/bg4.jpg"},
						group:{name:"孤独摇滚吧唧"},
						role:{name:"凉",rolePrice:48},
						order:{goodsNums:3,state:"已付款"}
					},{
						goods:{coverImage:"../../static/images/gugou/bg4.jpg"},
						group:{name:"孤独摇滚吧唧"},
						role:{name:"喜多",rolePrice:48},
						order:{goodsNums:2,state:"未付款"}
					},
					{
						goods:{coverImage:"../../static/images/gugou/bg4.jpg"},
						group:{name:"孤独摇滚吧唧"},
						role:{name:"波奇",rolePrice:24},
						order:{goodsNums:1,state:"未付款"}
					}
				],
				value: null,
				range: [
					{ value: 0, text: "不限" },
					{ value: 1, text: "七天内" },
					{ value: 2, text: "30天内" },
					{ value: 3, text: "半年前" },
					{ value: 4, text: "一年前" }
				],
			}
		},
		methods: {
			onshow(){
				this.getOrderDetails();
			},
			getOrderDetails(){
				getOrderDetail(this.orderId).then(res=>{
					
				})
			},
			navClick(value){
				this.activeIndex=value;
				console.log(value);
			},
		}
	}
</script>

<style lang="scss" scoped>
page{
	background-color: #f0f9fc;
}
// swiper{
// 	height: 1300rpx;
// }
.navBox{
		// display: flex;
		// justify-content: space-around;
		width: 90%;
		height: 80rpx;
		line-height: 80rpx;
		font-size: 32rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		.picker {
			width: 60%;
		}
		.excel {
			line-height: 60rpx;
			font-size: 30rpx;
			padding: 0 10rpx;
			background-color: #8dcf8d;
			border-radius: 15px;
		}
		// background-color: #fff;
		// border-bottom: 0.5rpx solid #5e5e5e;
		// color: #ccc;
		// .item{
		// 	text-align: center;
		// 	&.activeBox{
		// 		border-bottom:2px solid #84C3DD;
		// 		font-size: 36rpx;
		// 	}
		// }
}
.orders{
	margin: 0 auto;
	padding-top: 20rpx;
	background-color: #f6fbfc;
	// height: 900rpx;
	min-height: 2000rpx;
	font-size: 30rpx;
	.orderItem{
		display: flex;
		align-items: center;
		width: 90%;
		height: 200rpx;
		background-color: #fff;
		margin: 0 auto;
		margin-bottom: 20rpx;
		border-radius: 30rpx;
		padding: 10rpx 40rpx 10rpx 10rpx;
		.cover{
			width: 140rpx;
			height: 140rpx;
			margin-left: 20rpx;
			image{
				width: 100%;
				height: 100%;
			}
		}
		.goodsName{
			flex: 2;
			display: flex;
			height: 140rpx;
			flex-direction: column;
			justify-content: center;
			padding-left: 10rpx;
			.groupName{
				flex: 1;
				padding: 0 20rpx;
			}
			.roleName{
				flex: 1;
				padding: 20rpx 0 0 20rpx;
				color: #9D9D9E;
			}
		}
		.details{
			flex: 1;
			display: flex;
			flex-direction: column;
			align-items: flex-end;
			height: 70%;
			.state{
				flex: 1;
				color: #D64A43;
				
			}
			.rolePrice{
				flex: 1;
			}
			.count{
				flex: 1;
				font-size: 34rpx;
				color: #9D9D9E;
			}
		}
	}
}

/* 下拉列表 */
.uni-select__input-box,
.uni-select__input-placeholder {
    height: 80rpx;
    line-height: 80rpx;
    font-size: 26rpx !important;
}

.uni-select__input-text {
    color: #4D4D4D !important;
}


.uni-select__selector {
    width: 200rpx !important;
}

.uni-stat__select {
    height: 100%;
}

.uni-select {
    border: 0 !important;
}
</style>
